<template>
    <!-- 关于我们 -->
    <div class="aboutUs">
        <div class="header">关于我们</div>
        <div class="mainpadding">
            <div class="fwbxontent" v-html="content"></div>
        </div>
    </div>
</template>

<script>
import { getAboutUs } from "@/api/userinfo"
export default {
    inject: ['closeloading'],
    data() {
        return {
            content: "",
        }
    },
    mounted(){
        this.init()

    },
    methods:{
        init() {
            getAboutUs().then(res => {
                this.closeloading()
                this.content = this.showHtml(res.result.data.agreement);
                // this.content = res.result.data.agreement
            })
        },
        // 富文本处理
        showHtml(str) {
            return str
                .replace(str ? /&(?!#?\w+;)/g : /&/g, '&amp;')
                .replace(/&lt;/g, "<")
                .replace(/&gt;/g, ">")
                .replace(/&quot;/g, "\"")
                .replace(/&#39;/g, "\'")
                .replace(/&amp;nbsp;/g, '\u3000')
        },
    }
}
</script>

<style lang="scss" scoped>
.header {
    height: 50px;
    border-bottom: 1px solid #e4e4e4;
    line-height: 50px;
    padding-left: 30px;
}
</style>